package com.tengfei.blogsystem.utils;

/**
 * @version v1.0
 * @author} feige
 * @date 2021-10-16-16:34
 * @description
 */
public interface Constants {
    interface User {
        // admin角色
        String ROLE_ADMIN = "role_admin";
        // 普通角色
        String ROLE_NORMAL = "role_normal";
        // 默认头像
        String DEFAULT_AVATAR = "https://api.btstu.cn/sjtx/api.php";
        // 默认状态
        String DEFAULT_STATE = "1";
        //验证码的key
        String KEY_CAPTCHA_CONTENT = "key_captcha_content_";
        // 邮箱验证码的key
        String KEY_EMAIL_CONTENT = "key_email_content_";
        // 邮箱限制的key
        String KEY_EMAIL_SEND_IP = "key_email_send_ip_";
        // 邮箱限制的邮箱名
        String KEY_EMAIL_SEND_ADDRESS = "key_email_send_address_";
        // token的Key
        String KEY_TOKEN = "key_token_";
    }

    interface Settings {
        String MANAGER_ACCOUNT_INIT_STATE = "manager_account_init_state";
        String WEB_SITE_TITLE = "web_site_title";
        String WEB_SITE_DESCRIPTION = "web_site_description";
        String WEB_SITE_KEYWORDS = "web_site_keywords";
        String WEB_SITE_VIEW_COUNT = "web_site_view_count";
    }

    interface TimeValue {
        int HOUR = 60 * 60;
        int DAY = HOUR * 24;
        int MONTH = DAY * 30;
    }

    interface PageValue {
        int DEFAULT_PAGE = 1;
        int MIN_SIZE = 10;
    }

    interface Article {
        // 标题长度
        int TITLE_MAX_LENGTH = 64;
        // 摘要长度
        int SUMMARY_MAX_LENGTH = 256;
        // 0表示删除，1表示正文，2表示草稿，3表示置顶
        String STATE_DELETE = "0";
        String STATE_PUBLISH = "1";
        String STATE_DRAFT = "2";
        String STATE_TOP = "3";
    }
}
